home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Mail / MailEnclosure / Source.v0.15 / StringStorage.h < prev    next >
Text File  |  1995-06-12  |  1KB  |  36 lines

  1. #import <objc/Storage.h>
  2.  
  3. /*
  4. ** StringStorage.h,v 1.4 1992/05/21 22:46:59 nwc Exp
  5. **
  6. ** Copyright (c) 1991 Ronin Consulting, Inc.
  7. **
  8. ** StringStorage is a subclass of Storage designed to store null 
  9. ** terminated character strings. Null termination is guaranteed, therefore
  10. ** should this object's setStringValue method be called with a (char *)0
  11. ** arguement the resulting value from stringValue will be a null terminated
  12. ** empty string, i.e. "" not (char *)0.
  13. */
  14.  
  15. @interface StringStorage : Storage
  16.  
  17. - init;
  18. - init: (const char *) str;
  19.  
  20. - setStringValue: (const char *) str;         /* Set the string value */
  21. - (const char *) stringValue;             /* return the string pointer */
  22.  
  23. - appendStringValue: (const char *)str;         /* append another string to the strings contents */
  24. - appendCharValue: (char) c;             /* append a character to the strings contents */
  25.  
  26. - (int) matchSubstring: (const char *)str;
  27. - (char *) getSubstring: (const char *)str;
  28. - replaceSubstring: (const char *)str with: (const char *)str2;
  29.  
  30. - (int) strlen;                     /* just (count - 1)...but cleaner */
  31.  
  32. - empty;                     /* override to ensure null termination */
  33. - (unsigned int)hash;                 /* Provide a hash function */
  34.  
  35. @end
  36.